package com.wei.duowan.bbs.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * 作者：赵若位
 * 时间：2019/8/29 22:19
 * 联系方式：1070138445
 * 功能：
 */
public class NewsBean implements Parcelable
{
    /**
     * channelId : www
     * id : 431028976974
     * tag : 2017新闻中心,综合新闻,
     * title : 魔兽争霸三国篇《三国将无双》兽灵救世之战打响
     * subtitle : &&三国将无双
     * digest :
     * pictureUrl : http://img.dwstatic.com/www/1908/431028976974/431028977001.jpg
     * author : 北京惊蛰世纪
     * publishTime : 1567073777
     * lastUpdateTime : 1567073853
     * url : {"type":4,"url":"http://www.duowan.com/news/431028976974.html","id":0}
     * atlas : {"covers":[],"picCount":0}
     * showType : 2
     * articleUrl : http://www.duowan.com/news/431028976974.html
     * author_avatar : null
     * comment : 1
     */
    private String channelId;
    private String id;
    private String tag;
    private String title;
    private String subtitle;
    private String digest;
    private String pictureUrl;
    private String author;
    private long publishTime;
    private long lastUpdateTime;
    private UrlBean url;
    private AtlasBean atlas;
    private int showType;
    private String articleUrl;
    private String author_avatar;
    private String comment;
    /*广告连接*/
    private String adLink;
    /*广告图片*/
    private String adSrc;
    /*广告标签*/
    private String is_ad;


    protected NewsBean(Parcel in)
    {
        channelId = in.readString();
        id = in.readString();
        tag = in.readString();
        title = in.readString();
        subtitle = in.readString();
        digest = in.readString();
        pictureUrl = in.readString();
        author = in.readString();
        publishTime = in.readLong();
        lastUpdateTime = in.readLong();
        showType = in.readInt();
        articleUrl = in.readString();
        author_avatar = in.readString();
        comment = in.readString();
        adLink = in.readString();
        adSrc = in.readString();
        is_ad = in.readString();
    }

    public static final Creator<NewsBean> CREATOR = new Creator<NewsBean>()
    {
        @Override
        public NewsBean createFromParcel(Parcel in)
        {
            return new NewsBean(in);
        }

        @Override
        public NewsBean[] newArray(int size)
        {
            return new NewsBean[size];
        }
    };

    public String getChannelId()
    {
        return channelId;
    }

    public void setChannelId(String channelId)
    {
        this.channelId = channelId;
    }

    public String getId()
    {
        return id;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public String getTag()
    {
        return tag;
    }

    public void setTag(String tag)
    {
        this.tag = tag;
    }

    public String getTitle()
    {
        return title;
    }

    public void setTitle(String title)
    {
        this.title = title;
    }

    public String getSubtitle()
    {
        return subtitle;
    }

    public void setSubtitle(String subtitle)
    {
        this.subtitle = subtitle;
    }

    public String getDigest()
    {
        return digest;
    }

    public void setDigest(String digest)
    {
        this.digest = digest;
    }

    public String getPictureUrl()
    {
        return pictureUrl;
    }

    public void setPictureUrl(String pictureUrl)
    {
        this.pictureUrl = pictureUrl;
    }

    public String getAuthor()
    {
        return author;
    }

    public void setAuthor(String author)
    {
        this.author = author;
    }

    public long getPublishTime()
    {
        return publishTime;
    }

    public void setPublishTime(long publishTime)
    {
        this.publishTime = publishTime;
    }

    public long getLastUpdateTime()
    {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(long lastUpdateTime)
    {
        this.lastUpdateTime = lastUpdateTime;
    }

    public UrlBean getUrl()
    {
        return url;
    }

    public void setUrl(UrlBean url)
    {
        this.url = url;
    }

    public AtlasBean getAtlas()
    {
        return atlas;
    }

    public void setAtlas(AtlasBean atlas)
    {
        this.atlas = atlas;
    }

    public int getShowType()
    {
        return showType;
    }

    public void setShowType(int showType)
    {
        this.showType = showType;
    }

    public String getArticleUrl()
    {
        return articleUrl;
    }

    public void setArticleUrl(String articleUrl)
    {
        this.articleUrl = articleUrl;
    }

    public String getAuthor_avatar()
    {
        return author_avatar;
    }

    public void setAuthor_avatar(String author_avatar)
    {
        this.author_avatar = author_avatar;
    }

    public String getComment()
    {
        return comment;
    }

    public void setComment(String comment)
    {
        this.comment = comment;
    }


    public String getAdLink()
    {
        return adLink;
    }

    public void setAdLink(String adLink)
    {
        this.adLink = adLink;
    }

    public String getAdSrc()
    {
        return adSrc;
    }

    public void setAdSrc(String adSrc)
    {
        this.adSrc = adSrc;
    }

    public String getIs_ad()
    {
        return is_ad;
    }

    public void setIs_ad(String is_ad)
    {
        this.is_ad = is_ad;
    }

    @Override
    public int describeContents()
    {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i)
    {
        parcel.writeString(channelId);
        parcel.writeString(id);
        parcel.writeString(tag);
        parcel.writeString(title);
        parcel.writeString(subtitle);
        parcel.writeString(digest);
        parcel.writeString(pictureUrl);
        parcel.writeString(author);
        parcel.writeLong(publishTime);
        parcel.writeLong(lastUpdateTime);
        parcel.writeInt(showType);
        parcel.writeString(articleUrl);
        parcel.writeString(author_avatar);
        parcel.writeString(comment);
        parcel.writeString(adLink);
        parcel.writeString(adSrc);
        parcel.writeString(is_ad);
    }

    public static class UrlBean
    {
        /**
         * type : 4
         * url : http://www.duowan.com/news/431028976974.html
         * id : 0
         */

        private int type;
        private String url;
        private String id;

        public int getType()
        {
            return type;
        }

        public void setType(int type)
        {
            this.type = type;
        }

        public String getUrl()
        {
            return url;
        }

        public void setUrl(String url)
        {
            this.url = url;
        }

        public String getId()
        {
            return id;
        }

        public void setId(String id)
        {
            this.id = id;
        }
    }

    public static class AtlasBean
    {
        /**
         * covers : []
         * picCount : 0
         */

        private int picCount;
        private List<?> covers;

        public int getPicCount()
        {
            return picCount;
        }

        public void setPicCount(int picCount)
        {
            this.picCount = picCount;
        }

        public List<?> getCovers()
        {
            return covers;
        }

        public void setCovers(List<?> covers)
        {
            this.covers = covers;
        }
    }
}
